package com.bawei.car.domain;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 购物车添加请求类
 */
@Data
public class CarInfo {
    private Long id;

    /**
     * 商品id
     */
    private Long productId;
    /**
     * 商品规格id
     */
    private Long productSkuId;
    /**
     * 商品数量
     */
    private Long number;

    /**
     * 是否选中
     */
    private String isChecked;
    /**
     * 状态
     */
    private String status;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductSkuId() {
        return productSkuId;
    }

    public void setProductSkuId(Long productSkuId) {
        this.productSkuId = productSkuId;
    }

    public Long getNumber() {
        return number;
    }

    public void setNumber(Long number) {
        this.number = number;
    }

    public String getIsChecked() {
        return isChecked;
    }

    public void setIsChecked(String isChecked) {
        this.isChecked = isChecked;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public CarInfo() {
    }

    public CarInfo(Long id, Long productId, Long productSkuId, Long number, String isChecked, String status, String createBy, Date createTime, Date updateTime) {
        this.id = id;
        this.productId = productId;
        this.productSkuId = productSkuId;
        this.number = number;
        this.isChecked = isChecked;
        this.status = status;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "CarInfo{" +
                "id=" + id +
                ", productId=" + productId +
                ", productSkuId=" + productSkuId +
                ", number=" + number +
                ", isChecked='" + isChecked + '\'' +
                ", status='" + status + '\'' +
                ", createBy='" + createBy + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
